Synthesis of materials using nanostructured templates has emerged as a useful and versatile technique to generate ordered nanostructures. Conventionally, templates consisting of materials such as microporous membranes, zeolites, and crystalline colloidal arrays have been used to construct elaborate electronic, mechanical or optical structures. However, these templates are not amenable to precise and accurate patterning techniques, limiting their respective applications as templates. In addition, to the inventors' knowledge, there is no general, rapid method to construct designed, complicated optical filters such as one-dimensional photonic crystals from common engineering materials such as plastics, polymers, or resins. Most methods used to prepare optical filters such as dielectric stacks rely on lamination or vapor deposition routes, and the complexity of the process increases with the complexity of the desired optical filter characteristics. Self-assembly routes, such as the spontaneous ordering that occurs when colloidal beads are allowed to pack tightly together, do not allow the design of an optical structure with arbitrarily chosen spectral features. Moreover, while silicon, porous silicon, SiO2 and alumina-based materials are readily configured according to precise specifications, the chemical and mechanical stability of porous silicon, SiO2 and alumina for a variety of applications has historically presented a significant problem.